package com.itheima.dao;

import com.itheima.pojo.CheckGroup;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckGroupMapper {
    /**
     * 根据检查组id查询检查组信息
     * @param checkGroupId
     * @return
     */
    @Select("select * from itcast_health.t_checkgroup where id = #{checkGroupId}")
    CheckGroup findById(Integer checkGroupId);

    /**
     * 根据检查组id查询检查项id
     * @param checkGroupId
     * @return
     */
    @Select("select checkitem_id from itcast_health.t_checkgroup_checkitem where checkgroup_id = #{checkGroupId}")
    List<Integer> findCheckItemIdsByCheckGroupId(Integer checkGroupId);
}
